package com.inspur.edp.common.expr.spi;


import com.inspur.edp.common.expr.ast.ASTContext;
import com.inspur.edp.common.expr.ast.CompileUnitParser;
import com.inspur.edp.common.expr.ast.CompileUnitVisitor;
import com.inspur.edp.common.expr.visitor.VisitResult;
import com.inspur.edp.common.type.Field;
import io.iec.edp.caf.multicontext.annotation.Collect;

/**
 * @author lizhaorui
 * @description TODO
 * @date 2024/7/15 18:24
 */

@Collect
public interface FieldVisitor {

    String CLASS_CAST_TAG_KEY = "classCast";

    String getKind();

    VisitResult visitGetter(CompileUnitVisitor visitor,
                            ASTContext context,
                            CompileUnitParser.FieldAccessExprContext fieldAccessExprContext,
                            CompileUnitParser.ExpressContext objectExpr,
                            Field field);

    VisitResult visitSetter(CompileUnitVisitor visitor,
                            ASTContext context,
                            CompileUnitParser.ExpressContext objectExpr,
                            Field field,
                            CompileUnitParser.ExpressContext valueExpr);
}
